#include <cstdio>
#include <cstring>

int left[6] = {1, 5, 2, 3, 0, 4};
int up[6] = {3, 1, 0, 5, 4, 2};

void trans(int *T, int *p) {
	int q[6];
	memcpy(q, p, sizeof(q));
	for (int i=0; i<6; i++) {
		p[i] = q[T[i]];
	}
}

void generate() {
	int p0[6] = {0, 1, 2, 3, 4, 5};
	printf("int dice24[24][6] = {\n");
	for (int i=0; i<6; i++) {
		int p[6];
		memcpy(p, p0, sizeof(p0));
		if (i==0) {
			trans(up, p);
		} else if (i==1) {
			trans(left, p); trans(up, p);
		} else if (i==3) {
			trans(up, p); trans(up, p);
		} else if (i==4) {
			trans(left, p); trans(left, p); trans(left, p); trans(up, p);
		} else if (i==5) {
			trans(up, p); trans(up, p); trans(up, p);
		}
		printf("\t");
		for (int j=0; j<4; j++) {
			printf("{%d,%d,%d,%d,%d,%d}, ", p[0], p[1], p[2], p[3], p[4], p[5]);
			trans(left, p);
		}
		printf("\n");
	}
	printf("};\n");
}

int main() {
	generate();
	return 0;
}
